<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>mbed-lib: mbed_can.h File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />



</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">mbed-lib
   &#160;<span id="projectnumber">1.0</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">mbed_can.h File Reference</div>  </div>
</div>
<div class="contents">

<p>Various definitions for the CANopen implementation.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;LPC17xx.h&quot;</code><br/>
<code>#include &quot;lpc17xx_can.h&quot;</code><br/>
<code>#include &quot;lpc17xx_pinsel.h&quot;</code><br/>
</div>
<p><a href="mbed__can_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mbed__can_8h.html#a94977ca6ec91be83fdae5ac937deb7f9">MBED_CAN_H</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#ga3bca07b8ad662cd504df4c0de41769b7">CAN_COB_NMT</a>&#160;&#160;&#160;(0 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#gaf88f80f96debacbac8228802dd75a159">CAN_COB_SYNC</a>&#160;&#160;&#160;(1 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#ga6c19300ecc0f29de9de498741a324b2e">CAN_COB_TIME</a>&#160;&#160;&#160;(2 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#gaee2df258fc5a83f1c46031bad505f4b4">CAN_COB_EMCY</a>&#160;&#160;&#160;(1 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#gae53e0c16a4d2e838f33ac93750cfe16f">CAN_COB_TPDO1</a>&#160;&#160;&#160;(3 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#ga71d1ead567de2ccf72b6d766fded8d44">CAN_COB_RPDO1</a>&#160;&#160;&#160;(4 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#ga942b09187f9bedeab6737b244b415322">CAN_COB_TPDO2</a>&#160;&#160;&#160;(5 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#ga2d3b983d7dbbe135c14a0c8aedc0ec7f">CAN_COB_RPDO2</a>&#160;&#160;&#160;(6 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#gad76e0419c11e5c94c6af7190f4a02d8c">CAN_COB_TPDO3</a>&#160;&#160;&#160;(7 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#ga7f5b095f91fbc088536cd655ae48921d">CAN_COB_RPDO3</a>&#160;&#160;&#160;(8 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#ga9acc78c7da2263a388d66fd302f93754">CAN_COB_TPDO4</a>&#160;&#160;&#160;(9 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#gaf8d749925bb9261db867aab08131d912">CAN_COB_RPDO4</a>&#160;&#160;&#160;(10 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#ga7b7137afef284d09d1798f9d2d65566b">CAN_COB_TSDO</a>&#160;&#160;&#160;(11 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#gaa5bc920091e8cb42454a54cad23fb331">CAN_COB_RSDO</a>&#160;&#160;&#160;(12 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cobs.html#gab82e13909a1ad1b0e89f7df9e4fefa69">CAN_COB_ERROR_CONTROL</a>&#160;&#160;&#160;(14 &lt;&lt; 7)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nmt.html#ga54a7aab0edab952d6db2b1672dfcc6c0">CAN_NMT_START</a>&#160;&#160;&#160;0x01</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nmt.html#gab43455ea1d1a63e374728bbd607bd61d">CAN_NMT_STOP</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nmt.html#ga86b3b4c7dea73ed16d9afcd54fdb45e4">CAN_NMT_PREOP</a>&#160;&#160;&#160;0x80</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nmt.html#ga2bbae8bbd244861113596642c414b8f7">CAN_NMT_RESET</a>&#160;&#160;&#160;0x81</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__nmt.html#gadb0a54fb1ac13cd7f194be9ce4d6be28">CAN_NMT_RSCOMM</a>&#160;&#160;&#160;0x82</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mbed__can_8h.html#a52ff3ecfc2500c39903bb92e7697d42a">CAN_BUFSIZE</a>&#160;&#160;&#160;256</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mbed__can_8h.html#afbfef7d6f48e2bf773ab3e874470ad3c">setCANBaudrate</a> (uint8_t, uint32_t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Baudrate configuration function.  <a href="#afbfef7d6f48e2bf773ab3e874470ad3c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mbed__can_8h.html#a1bdacc15fdcb6b416a648463c750169b">initCAN</a> (uint8_t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">CAN initialization function.  <a href="#a1bdacc15fdcb6b416a648463c750169b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mbed__can_8h.html#adafab56184ba5d6613ef4d369d4083fc">CANopenRecv</a> (uint8_t, uint8_t *, uint32_t *, uint8_t *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Receive a CAN message via CANopen protocol.  <a href="#adafab56184ba5d6613ef4d369d4083fc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mbed__can_8h.html#aedfe405981f125d87a3d18b020df673b">CANopenSend</a> (uint8_t, uint8_t, uint32_t, uint8_t, uint8_t *)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a CAN message via CANopen protocol.  <a href="#aedfe405981f125d87a3d18b020df673b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mbed__can_8h.html#a809df945514b3a52883ca62241425633">flushCANRxBuffer</a> (uint8_t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Flush CAN receive buffers.  <a href="#a809df945514b3a52883ca62241425633"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mbed__can_8h.html#a3e9fbeb7f38c5cade58bda7488e2f000">flushCANTxBuffer</a> (uint8_t)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Flush CAN transmit buffers.  <a href="#a3e9fbeb7f38c5cade58bda7488e2f000"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="mbed__can_8h.html#a7d1120d0271e11535def5f56d375e9a9">CAN_IRQHandler</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">CAN IRQ handler.  <a href="#a7d1120d0271e11535def5f56d375e9a9"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Various definitions for the CANopen implementation. </p>
<p>This file defines a basic number of objects and messages for the CANopen implementation provided by mbed-lib, and it provides function definitions. </p>
</div><hr/><h2>Define Documentation</h2>
<a class="anchor" id="a52ff3ecfc2500c39903bb92e7697d42a"></a><!-- doxytag: member="mbed_can.h::CAN_BUFSIZE" ref="a52ff3ecfc2500c39903bb92e7697d42a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CAN_BUFSIZE&#160;&#160;&#160;256</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>CAN buffer size. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__can0buf.html">MBED_CAN0 buffers</a> </dd>
<dd>
<a class="el" href="group__can1buf.html">MBED_CAN1 buffers</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a94977ca6ec91be83fdae5ac937deb7f9"></a><!-- doxytag: member="mbed_can.h::MBED_CAN_H" ref="a94977ca6ec91be83fdae5ac937deb7f9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MBED_CAN_H</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Header guard. </p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a7d1120d0271e11535def5f56d375e9a9"></a><!-- doxytag: member="mbed_can.h::CAN_IRQHandler" ref="a7d1120d0271e11535def5f56d375e9a9" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CAN_IRQHandler </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>CAN IRQ handler. </p>
<p>This routine is called when either of the CAN devices raises an interrupt. Do no call this routine yourself. </p>

</div>
</div>
<a class="anchor" id="adafab56184ba5d6613ef4d369d4083fc"></a><!-- doxytag: member="mbed_can.h::CANopenRecv" ref="adafab56184ba5d6613ef4d369d4083fc" args="(uint8_t, uint8_t *, uint32_t *, uint8_t *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t CANopenRecv </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>portNo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>nodeID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>cobType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Receive a CAN message via CANopen protocol. </p>
<p>This routine reads an availabe message from the CAN receive buffer, if available. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">portNo</td><td>CAN interface to read from. Should be MBED_CAN0 or MBED_CAN1. </td></tr>
    <tr><td class="paramname">nodeID</td><td>Address of variable to store the CAN device ID that sent the message. </td></tr>
    <tr><td class="paramname">cobType</td><td>Address of variable to store the COB type of the message. </td></tr>
    <tr><td class="paramname">data</td><td>Pointer to data storage.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if a message was successfully read, or an integer larger than 0 when no message was available.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="mbed__can_8h.html#aedfe405981f125d87a3d18b020df673b" title="Send a CAN message via CANopen protocol.">CANopenSend()</a> </dd>
<dd>
<a class="el" href="group__cobs.html">CANopen objects</a> </dd></dl>

</div>
</div>
<a class="anchor" id="aedfe405981f125d87a3d18b020df673b"></a><!-- doxytag: member="mbed_can.h::CANopenSend" ref="aedfe405981f125d87a3d18b020df673b" args="(uint8_t, uint8_t, uint32_t, uint8_t, uint8_t *)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t CANopenSend </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>portNo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>nodeID</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>cobType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Send a CAN message via CANopen protocol. </p>
<p>This routine sends a message via the CAN interface. If the message could not be sent (because the internal transmit buffers are full), the message is buffered and sent when when of the internal transmit buffers becomes availble. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">portNo</td><td>CAN interface to send on. Should be MBED_CAN0 or MBED_CAN1. </td></tr>
    <tr><td class="paramname">nodeID</td><td>ID of the CAN device the message should be sent to. </td></tr>
    <tr><td class="paramname">cobType</td><td>COB type of the message. </td></tr>
    <tr><td class="paramname">len</td><td>Message length. </td></tr>
    <tr><td class="paramname">data</td><td>Data to be sent. The total number of bytes that will be sent depends on the provided message length, but will never be more than eight bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 if a message was successfully sent or buffered, or an integer larger than 0 when both sending and buffering failed.</dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="mbed__can_8h.html#adafab56184ba5d6613ef4d369d4083fc" title="Receive a CAN message via CANopen protocol.">CANopenRecv()</a> </dd>
<dd>
<a class="el" href="group__cobs.html">CANopen objects</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a809df945514b3a52883ca62241425633"></a><!-- doxytag: member="mbed_can.h::flushCANRxBuffer" ref="a809df945514b3a52883ca62241425633" args="(uint8_t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void flushCANRxBuffer </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>portNo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Flush CAN receive buffers. </p>
<p>This routine flushes the CAN receive buffer by discarding all messages. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">portNo</td><td>CAN interface of which the buffer should be flushed. Should be MBED_CAN0 or MBED_CAN1.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="mbed__can_8h.html#a3e9fbeb7f38c5cade58bda7488e2f000" title="Flush CAN transmit buffers.">flushCANTxBuffer()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a3e9fbeb7f38c5cade58bda7488e2f000"></a><!-- doxytag: member="mbed_can.h::flushCANTxBuffer" ref="a3e9fbeb7f38c5cade58bda7488e2f000" args="(uint8_t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void flushCANTxBuffer </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>portNo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Flush CAN transmit buffers. </p>
<p>This routine flushes the CAN transmit buffer by discarding all messages. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">portNo</td><td>CAN interface of which the buffer should be flushed. Should be MBED_CAN0 or MBED_CAN1.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="mbed__can_8h.html#a809df945514b3a52883ca62241425633" title="Flush CAN receive buffers.">flushCANRxBuffer()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a1bdacc15fdcb6b416a648463c750169b"></a><!-- doxytag: member="mbed_can.h::initCAN" ref="a1bdacc15fdcb6b416a648463c750169b" args="(uint8_t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void initCAN </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>portNo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>CAN initialization function. </p>
<p>Initalizes the CAN interface. This function is called from <a class="el" href="mbed_8h.html#a56064159497d6e1856315680ebdc3ce3">initSys()</a>, only call this function if you know what you are doing. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">portNo</td><td>CAN interface to be initialized. Should be MBED_CAN0 or MBED_CAN1.</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="mbed_8h.html#a56064159497d6e1856315680ebdc3ce3" title="System initialization function.">initSys()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="afbfef7d6f48e2bf773ab3e874470ad3c"></a><!-- doxytag: member="mbed_can.h::setCANBaudrate" ref="afbfef7d6f48e2bf773ab3e874470ad3c" args="(uint8_t, uint32_t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void setCANBaudrate </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>portNo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>baudrate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Baudrate configuration function. </p>
<p>This function sets the baudrates for the MBED_CAN0 and MBED_CAN1 devices. Call this function before calling <a class="el" href="mbed_8h.html#a56064159497d6e1856315680ebdc3ce3">initSys()</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">portNo</td><td>CAN interface to set the baudrate for. Should be MBED_CAN0 or MBED_CAN1. </td></tr>
    <tr><td class="paramname">baudrate</td><td>Desired baudrate, in bits per second. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>


<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 18 2012 14:53:28 for mbed-lib by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
